package com.zatech.cgnci.project.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zatech.cgnci.project.dto.MessageQueryDTO;
import com.zatech.cgnci.project.entity.CgnciMessageDO;
import com.zatech.cgnci.project.entity.CgnciReInsuranceCompanyAccountDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zatech.cgnci.project.vo.MessageCountVO;
import com.zatech.cgnci.project.vo.MessageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CgnciMessageMapper extends BaseMapper<CgnciMessageDO> {

    /**
     * 分页查询消息
     */
    IPage<MessageVO> pageMessage(@Param("page") Page page,
                                 @Param("query") MessageQueryDTO queryDTO,
                                 @Param("receiver") String receiver);
            
    /**
     * 获取消息详情
     */
    MessageVO getDetail(@Param("messageId") Long messageId,
            @Param("receiver") String receiver);
            
    /**
     * 获取消息统计
     */
    MessageCountVO getCount(@Param("receiver") String receiver);
} 